#ifndef LIGHT_H
#define LIGHT_H
#include "example.h"

typedef struct Light             //灯结构体
{
  uint8_t light_address[3];        //灯地址
  uint8_t crowd_num;               //群号
  uint8_t group_num;               //组号
  uint8_t Tag_num;                 //位号
  uint8_t mode;                    //模式
  uint8_t period[2];               //周期
}s_light;

typedef struct LightList
{
  s_light           light;
  uint8_t           receiveCnt;
  uint8_t           scanCnt;
  struct LightList  *next;
}s_lightlist;

void     light_list_init(void);
void     remove_lightCnt_less_than(uint8_t level);
bool     is_list_head(s_lightlist* light);
s_lightlist* add_light(s_light* light);
s_lightlist* find_light(s_light* light);
s_lightlist* get_next_light(void);

#endif